#!/bin/bash
#备份目录
BACKUP_DIR=/opt/backup/mysql

#备份文件名
BACKUP_NAME=struct-huijingu.sql

#进入备份目录
mkdir -p $BACKUP_DIR
cd $BACKUP_DIR

#备份数据库
mysqldump -h localhost -uroot -p!QAZ2wsx@023 --no-data huijingu > ${BACKUP_DIR}/${BACKUP_NAME}

